import java.util.ArrayList;
import java.util.List;

/*
 * @author
 * @date: 2025/05/03  10:52
 * @description: 设置 -Xss2m
 */
public class Test1 {

    private void dontStop() {
        while (true) {

        }
    }
    public void stackLeakByThread() {
        while (true) {
            Thread thread = new Thread(new Runnable() {
                @Override
                public void run() {
                    dontStop();
                }
            });
            thread.start();
        }
    }
    public static void main(String[] args) {
        Test1 test1 = new Test1();
        test1.stackLeakByThread();
    }
}
